home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Geek Gadgets 2
/
Geek_Gadgets_2_2352.bin
/
lists
/
ade-gcc.archive.9602.gz
/
ade-gcc.archive.9602
/
000081_owner-ade-gcc_Fri Feb 16 02:50:23 1996.msg
< prev
next >
Wrap
Internet Message Format
|
1996-02-28
|
4KB
Return-Path: <owner-ade-gcc>
Received: by fishpond (Smail3.1.29.1 #57)
id m0tnKvm-000gXYa; Fri, 16 Feb 96 02:50 EST
Sender: owner-ade-gcc
Received: from ernie.icslab.agh.edu.pl by fishpond with smtp
(Smail3.1.29.1 #57) id m0tnKvf-000gXUC; Fri, 16 Feb 96 02:50 EST
Received: (from kiskra@localhost) by ernie.icslab.agh.edu.pl (8.6.12/8.6.12) id IAA18687; Fri, 16 Feb 1996 08:49:26 +0100
Date: Fri, 16 Feb 1996 08:49:26 +0100 (MET)
From: Kamil Iskra <kiskra@ernie.icslab.agh.edu.pl>
To: Rask Ingemann Lambertsen <c948374@student.dtu.dk>
cc: ADE GCC List <ade-gcc@amigalib.com>,
Amiga GCC List <amiga-gcc-port@nic.funet.fi>
Subject: Re: Passing arguments in registers - first attempt.
In-Reply-To: <Pine.HPP.3.91.960215172902.22466C-100000@tycho.gbar.dtu.dk>
Message-ID: <Pine.SUN.3.91.960216083252.17900B-100000@ernie>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Sender: owner-ade-gcc@ninemoons.com
Precedence: bulk
On Thu, 15 Feb 1996, Rask Ingemann Lambertsen wrote:
> > I think that in such
> > case, you should explicitly state in which registers you want arguments to
> > be passed.
>
> Do you want me to hack the whole GCC source just because I want it compiled
> with arguments passed in registers? I hope not :-)
Yes, I DO want you to hack the whole GCC source in such case :-). Keep in
mind, that this wouldn't be normally necessary - it would be necessary
only if you wanted ALL arguments to be passed in registers. If somebody
has so extraordinary requirements he won't mind spending a few months
patching GCC sources, will he? :-)
> > But, as Niels Moeller pointed out in his posting, implementing library
> > calls would become a nightmare. Should there be a separate library for
> > every possible "-mregparm=<number>"? I'm beginning to think that this is
> > not a good idea - if you want more than two data/addres/float registers,
> > you should state it explicitly - which argument in which register (this
> > is not currently possible, but will be). What do you think?
> I think people should be allowed to use their *own* brains when
> compiling/linking.
Very wise.
> It won't hurt them ;-)
Only if they have good quality brains :-)
> In other words, let the person
> who compiles the code decide how many arguments to pass in registers. Fixing
> the number of registers used will look like brain dammage if you don't
> use link libraries at all.
Maybe you are right. After all, baseline GCC contains several options
which are not supported by most OSes, like "rtd" return etc. They just
don't hurt as long as they are disabled by default. BTW: how is it
possible not to use link libraries *at all*? Do you use your own startup
code, or what?
> > Trivial implementation of using regargs with IXEmul would require
> > passing arguments from registers to stack - silly, isn't it?
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> That is what happens when using stack based calls. Yes, it is silly. Why do
> you think I wanted register based calls in the first place? ;-)
What I ment was that you would call a stub in "libc.a" using regargs, this
stub would pass arguments from registers to stack (like "libamiga.a", but
the other way round).
> Best (?) implementation would be inline headers for IXEmul calls which
> pushe the arguments on the stack, since ixemul.library expects them
> there.
You've got a point... Hans, what do you think?
> No offence taken :-) I'd just like to keep the door open for other compilers.
> That is why I want an command line option for the number of registers to use.
> Hell, if somebody then wanted to recompile the source with stack based
> calls, even that would be possible without hacking the code.
You've got a point again...
/ Kamil Iskra - AMIGA 1200, 68030 50MHz, HDD 850 MB, 10 MB RAM \
| iskra@student.uci.agh.edu.pl kiskra@ernie.icslab.agh.edu.pl |
| http://student.uci.agh.edu.pl/~iskra |
\ PGP public key available via Finger or WWW /